package mortal.game.control
{
    import modules.*;
    import mortal.game.events.*;
    import mortal.game.model.*;
    import mortal.game.mvc.*;
    import mortal.mvc.core.*;
    import mortal.mvc.interfaces.*;

    public class MoveAwardController extends Controller
    {

        public function MoveAwardController()
        {
            
        }

        private function onTransportMoveAwardReq(event:DataEvent) : void
        {
            var _loc_2:* = event.data as TransportInfo;
            if (view && view.isHide)
            {
                view.show();
            }
            (view as MoveAwardModule).updateData(EventName.TransportMoveAward, _loc_2);
            
        }

        private function onCycleTaskMoveAwardReq(event:DataEvent) : void
        {
            var _loc_2:* = event.data as CycleInfo;
            if (view.isHide)
            {
                view.show();
            }
            (view as MoveAwardModule).updateData(EventName.CycleTaskMoveAward, _loc_2);
            
        }

        override protected function initServer() : void
        {
            super.initServer();
            Dispatcher.addEventListener(EventName.TransportMoveAward, this.onTransportMoveAwardReq);
            Dispatcher.addEventListener(EventName.CycleTaskMoveAward, this.onCycleTaskMoveAwardReq);
            
        }

        override protected function initView() : IView
        {
            var _loc_1:* = new MoveAwardModule();
            return _loc_1;
        }

    }
}
